home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / Sample Code / Sample Editors⁄Viewers / Text Editor / TextEditor Read Me < prev    next >
Encoding:
Text File  |  1995-12-15  |  3.7 KB  |  53 lines  |  [TEXT/ttxt]

  1. TextEditor Read Me
  2. By The OpenDoc™ Sample Code Team
  3. December 15, 1995
  4.  
  5.  
  6. © 1995  Apple Computer, Inc. All Rights Reserved.
  7. Apple, the Apple logo, and Macintosh are registered trademarks of Apple Computer, Inc.
  8. Mac and OpenDoc are trademarks of Apple Computer, Inc.
  9. ---------------------------------------------------------------------------------------------------------------------------------
  10.  
  11. Important Note
  12.  
  13. TextEditor currently only works on MacOS computer with a PowerPC processor. There is no 68K version available.
  14.  
  15.  
  16. Introduction
  17.  
  18. Based on Textension, this part is similar to SimpleText.  It supports Mac TEXT data as well as native data formats.  In addition to the features implemented in SamplePart, this part adds the following functionality:
  19.  
  20.             - SOM class implementation
  21.             - handling of part menus
  22.             - drag and drop
  23.             - scrolling (when root of document)
  24.             - international TSM support
  25.             - preferences file
  26.             - settings and preferences dialogs
  27.             - supports Semantic Interface to handle TSM Apple events
  28.    - multiple kind support
  29.    - support for ScriptRunner
  30.  
  31.  
  32. Gotchas
  33.  
  34. • TextEditor's scroll bars will behave incorrectly with long documents.  This is as a result of the Control Manager's 16-bit limitation of the maximum of a Control. TextEditor doesn't attempt to work around this limitation, so once the document becomes more than 32767 pixels tall, this problem occurs.
  35.  
  36. • TextEditor does not handle multiple kinds, particularly the ExternalizeKinds function, as well as it could.  The ExternalizeKinds function is currently not called by the OpenDoc 1.0 shell, though it may be called by Container Applications and may be called in future versions of OpenDoc. The problem lies in the fact that TextEditor does not currently externalize all of the kinds requested of it — bases the set of kinds it externalizes solely on the preferred kind.
  37.  
  38. • TextEditor does not correctly support being embedded in a link destination. The Cappuccino sample part handles these cases correctly.
  39.  
  40. To correctly handle being in a link destination, you should get the link status of a frame before trying to edit it.  If it is a link destination, you should call EditInLink, and if EditInLink returns kODTrue, you should check the link status again -- this time, if it is still in a destination link, you should not allow the change to occur, otherwise, you should go ahead and make the change.
  41.  
  42. • TextEditor doesn't handle multiple display frames and will try to prevent them from being created. This is counter to the intended human interface of OpenDoc parts.
  43.  
  44. • TextEditor does not currently handle sequenced frames.
  45.  
  46. • There is some code indicating the potential existence of a ruler window that would allow adjusting of tab stops, etc.  This window never got implemented.
  47.  
  48. • TextEditor does not support embedding of other parts.
  49.  
  50. • TextEditor is based on a custom version of the Textension text editing engine written by Apple. Source code for Textension is not distributed with TextEditor. Instead, a library (.lib) file is included. This library file will only work with CodeWarrior 6 (that is, it will not work with other compilers or other versions of CodeWarrior). Because of these and other issues, TextEditor is not a good starting place for other parts (which is why there is no PartMaker document for it), although it may serve as a good example of how to do certain things with OpenDoc.
  51.  
  52. • In order to compile TextEditor, ScriptRunner must be available. There should be an access path that includes the ScriptRunner folder in the CodeWarrior preferences dialog. Also, in order to rebuild the IDL files, ScriptRunner must be available and you must put the path to ScriptRunner into TextEditor.make if it is different than the relative path that is included in that file.
  53.